#ifndef __PCI_RESOURCES_APP_H__
#define __PCI_RESOURCES_APP_H__

#define   MAX_BUS_NUM         0x100
#define   MAX_DEV_NUM         0x20
#define   MAX_FUN_NUM         0x08
#define   MEM_BELOW_4G_BASE   0xF0000000
#define   UNLOCK_OFFSET       0x054C

#define   PCI_BASE_ASSRESS    0xE0000000

#define PCI_DEV_MMBASE(Bus, Device, Function) \
  ( \
    (UINTN)PCI_BASE_ASSRESS + (UINTN) (Bus << 20) + (UINTN) (Device << 15) + (UINTN)(Function << 12) \
  )

#define PCI_REG_BASE(Bus, Device, Function, Reg) (PCI_DEV_MMBASE(Bus, Device, Function) + Reg)


#define ALIGNMENT(Address, Alignment) \
  ((Address) + (Alignment - ((Address) & (Alignment - 1))))


#endif